From: ckyrouac Date: Wed, 8 Oct 2025 19:52:28 +0000 (-0400) Subject: deploy: Use delete_if_present in can_soft_reboot X-Git-Tag: archive/raspbian/2025.7-2+rpi1^2^2~6^2^2~6^2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/%22stanciumarius94%40gmail.com//%22mailto:i18n-csb%40linuxcsb.org/%22/%22http:/www.example.com/%22stanciumarius94%40gmail.com/%22mailto:i18n-csb%40linuxcsb.org/%22?a=commitdiff_plain;h=7a5214e43f71b467e398f4c2dfee6d592b505a87;p=ostree.git deploy: Use delete_if_present in can_soft_reboot This avoids a dump when trying to delete the ostree= karg if it isn't present. This is an issue with bootc factory reset. Signed-off-by: ckyrouac --- diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index 3bfc8d9f..81cc6b38 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -4389,8 +4389,8 @@ ostree_sysroot_deployment_can_soft_reboot (OstreeSysroot *self, OstreeDeployment // Compare kargs without the ostree= entry, as that will vary per bootlink even for // the same boot checksum. - g_assert (ostree_kernel_args_delete (booted_kargs, "ostree", NULL)); - g_assert (ostree_kernel_args_delete (target_kargs, "ostree", NULL)); + g_assert (ostree_kernel_args_delete_if_present (booted_kargs, "ostree", NULL)); + g_assert (ostree_kernel_args_delete_if_present (target_kargs, "ostree", NULL)); return _ostree_kernel_args_equal (booted_kargs, target_kargs); }